import request from '@/api/request'
/* type: 0: 歌曲 1: mv 2: 歌单 3: 专辑 4: 电台 5: 视频 6: 动态 */
/* 获取热门评论 */
export const getHotComment = (id, type, limit, offset, before) => request({ url: '/comment/hot', params: { id, type, limit, offset, before, timestamp: Date.now() }, method: 'get' })
// 歌单评论
export const getNewComment = ({ id, limit, offset, before, type }) => {
  switch (type) {
    case 0: return request({ url: '/comment/music', params: { id, limit, offset, before }, method: 'get' })
    case 1: return request({ url: '/comment/mv', params: { id, limit, offset, before }, method: 'get' })
    case 2: return request({ url: '/comment/playlist', params: { id, limit, offset, before }, method: 'get' })
    case 3: return request({ url: '/comment/album', params: { id, limit, offset, before }, method: 'get' })
    case 4: return request({ url: '/comment/video', params: { id, limit, offset, before }, method: 'get' })
  }
} 